from PIL import Image
from torch.utils.tensorboard import SummaryWriter
from torchvision import transforms

img_path = 'data/train/ants/0013035.jpg'
img = Image.open(img_path)

writer = SummaryWriter('logs')

trans_tensor = transforms.ToTensor()
img_tensor = trans_tensor(img)
print(img_tensor)
writer.add_image('tensor', img_tensor)
